-
Notifications
You must be signed in to change notification settings - Fork 7.4k
posix: implement putmsg() #67711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
posix: implement putmsg() #67711
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there, please have a look at our contribution guidelines and make sure that the commit title & message conform to our standard.
Haven't looked at the details, some obvious issues:
- files missing copyright notice
- formatting, can be fixed quite easily in vscode (shift + alt + f, or ctrl + shift + p ->
"Format document"
) - comments should be
/* comment */
instead of// comment
Have a look at how to rebase this branch on top of the |
Hi, do I need to add the path to #include <zephyr/ztest.h>
#include <stropts.h>
#include <errno.h>
ZTEST(stropts, test_putmsg)
{
int ret = putmsg(0, NULL, NULL, 0);
zassert_equal(ret, -1, "Expected return value -1, got %d", ret);
zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
}
ZTEST_SUITE(stropts, NULL, NULL, NULL, NULL, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AbhinavMir - remember to add entries in lib/posix/Kconfig
and lib/posix/CMakeLists.txt
For this one, maybe CONFIG_POSIX_PUTMSG
?
1118890
to
f492741
Compare
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Hi @ycsin I got my tests running, I also did a rebase, squash, and force. Does this look right? |
It seems like you merged the upstream This can be done (in your PR branch) if you are using VSCode (after fetching remote branch): As things stand now, it might be easier for you to simply backup your work, hard reset this PR branch to upstream |
This makes sense, my bad! @ycsin Would it make more sense to make a new PR? Since this PR will be looked at by people who want to commit to |
People won't be notified if PR is still in draft, I think it should be fine to clean this up within this PR, this happens very often to new contributors. |
f492741
to
7bcd069
Compare
a69bb3d
to
1e6020a
Compare
@ycsin rebased and squashed, and made sure all tests pass! |
@AbhinavMir this needs a rebase |
Minimal header for stropts Signed-off-by: Abhinav Srivastava <[email protected]>
Add needed KConfig, CMakeList and Stropts.c Signed-off-by: Abhinav Srivastava <[email protected]>
1e6020a
to
f45f225
Compare
f45f225
to
b6c6c31
Compare
Add tests, Fix config issues, Re-add Timer Signed-off-by: Abhinav Srivastava <[email protected]>
b6c6c31
to
17ac740
Compare
maybe I missing something here, but is the purpose of this PR to just introduce putmsg as a not supported implementation?
so just a placeholder? |
That is correct. The symbol needs to exist so that a conformant application can link. |
Looks like docs should be updated? https://docs.zephyrproject.org/latest/services/portability/posix/option_groups/index.html#xopen-streams |
link yes, but it will not work if the implementation just returns an error.... How the documentation will need to change i.e. in doc/services/portability/posix/option_groups/index.rst would we put a "yes" next to putmsg? I guess not, right?, because it is not implemented. |
it is 'supported' (in terms of 'can be compiled') but the function isn't implemented (
yes you are right |
Hi @AbhinavMir! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Fixes #66978